/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package bs.ventas.modelo;

import bs.global.modelo.ConceptoPorComprobante;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;

/**
 *
 * @author Claudio
 */
@Entity
@DiscriminatorValue("VT")
public class ConceptoPorComprobanteVenta extends ConceptoPorComprobante{
    
    /**
     * Comprobante 
     */
    @JoinColumns({
    @JoinColumn(name = "MODCOM", referencedColumnName = "MODCOM", nullable = false,insertable=false, updatable=false),
    @JoinColumn(name = "CODCOM", referencedColumnName = "CODCOM", nullable = false,insertable=false, updatable=false)
    })
    @ManyToOne(fetch = FetchType.LAZY)
    ComprobanteVenta comprobante;
    
        
    @JoinColumns({
        @JoinColumn(name = "MODCPT", referencedColumnName = "MODCPT", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "TIPCPT", referencedColumnName = "TIPCPT", nullable = false, insertable=false, updatable=false),
        @JoinColumn(name = "CODCPT", referencedColumnName = "CODIGO", nullable = false, insertable=false, updatable=false)
    })
    @ManyToOne(fetch = FetchType.LAZY)
    private ConceptoVenta concepto;
    
}
